checking for symmetric reflexive and transitive